<?php
/* @var $this JokesController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs = array(
	'Jokes',
);
?>

<div class="main jokes">
	<span style="float: left;">Bancuri din categoria <?php echo $currentCategory->name; ?>.</span>
	<span style="float: right;">
		<?php if(!(Yii::app()->user->isGuest)){
		echo CHtml::link('Adauga un banc', 'add/'.$currentCategory->id, array('class' => 'more'));
		}?>
	</span>
	<span style="float: none;"/><br/><br/>
	<?php
	$this->widget('zii.widgets.CListView', array(
		'dataProvider' => $jokesProvider,
		'itemView' => '_joke',
		'template'   => '<ul class="news">{items}</ul>{pager}',
	));
	?>
</div>

<div class="sidebar">
	<h1><?php echo CHtml::encode(Yii::app()->getModule('user')->t("Categories")); ?></h1>
	<ul class="posts">
		<?php foreach ($categories as $category): ?>
		<li>
			<h4 class="title">
			<?php echo CHtml::link(CHtml::encode($category->name), array('view', 'id'=>$category->id)); ?>
			</h4>
		</li>
		<?php endforeach; ?>
	</ul>
</div>
